import request from '@/utils/request'

/**
 * 获取数据
 */
export function getfromList(params) {
  return request({
    url: 'permission/role',
    method: 'GET',
    params
  })
}

/**
 * 创建角色
 */
export function createList(data) {
  return request({
    url: 'permission/role',
    method: 'POST',
    data
  })
}
/**
 * 删除角色
 */
export function delCharacters(id) {
  return request({
    url: `permission/role/${id}`,
    method: 'DELETE'
  })
}
/**
 * 编辑获取对应的信息
 */
export function CharactersId(id) {
  return request({
    url: 'permission/role/' + id,
    method: 'GET'
  })
}
/** id
 * 实现编辑功能
 * @param {*} id
 * @returns
 */
export function editRole(data) {
  return request({
    url: `permission/role/${data.id}`,
    method: 'PUT',
    data
  })
}
